package com.bus.core.entity;

import com.bus.core.common.Comment;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import java.time.LocalDateTime;

@Entity
@Table(name = "c_collect", uniqueConstraints = {
        @UniqueConstraint(columnNames = {"collector", "aimId", "model"})
})
@EqualsAndHashCode(callSuper = false)
@Data
@Comment("收藏表")
public class CollectEntity {
    @Id
    @Comment("id")
    private String id;

    @Comment("收藏者id")
    private String collector;

    @Comment("收藏时间")
    private LocalDateTime collectAt;

    @Comment("收藏的id")
    private String aimId;

    @Comment("收藏模型")
    private String model;
}
